/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/*
 * ManageTagsPanel.java
 *
 * Created on May 19, 2011, 1:38:26 PM
 */
package org.netbeans.modules.git.ui.tag;

import javax.swing.DefaultListModel;
import org.netbeans.modules.git.ui.repository.RevisionInfoPanel;

/**
 *
 * @author ondra
 */
public class ManageTagsPanel extends javax.swing.JPanel {
    private final RevisionInfoPanel revisionInfoPanel;

    /** Creates new form ManageTagsPanel */
    public ManageTagsPanel (RevisionInfoPanel revisionInfoPanel) {
        this.revisionInfoPanel = revisionInfoPanel;
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        org.netbeans.modules.git.ui.repository.RevisionInfoPanel revisionInfoPanel1 = this.revisionInfoPanel;
        jScrollPane1 = new javax.swing.JScrollPane();

        jLabel1.setLabelFor(txtTagName);
        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.jLabel1.text")); // NOI18N

        txtTagName.setEditable(false);
        txtTagName.setText(org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.txtTagName.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.jLabel6.text")); // NOI18N

        jLabel7.setLabelFor(lstTags);
        org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.jLabel7.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(btnDelete, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.btnDelete.text")); // NOI18N
        btnDelete.setToolTipText(org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.btnDelete.TTtext")); // NOI18N

        txtTaggedObject.setEditable(false);
        txtTaggedObject.setText(org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.txtTaggedObject.text")); // NOI18N

        lblTaggedObject.setLabelFor(txtTaggedObject);
        org.openide.awt.Mnemonics.setLocalizedText(lblTaggedObject, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.lblTaggedObject.text")); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(revisionInfoPanel1, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(lblTaggedObject)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtTaggedObject, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)))
                .addGap(0, 0, 0))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTaggedObject)
                    .addComponent(txtTaggedObject, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(revisionInfoPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, Short.MAX_VALUE)
                .addGap(0, 0, 0))
        );

        javax.swing.GroupLayout panelProgressLayout = new javax.swing.GroupLayout(panelProgress);
        panelProgress.setLayout(panelProgressLayout);
        panelProgressLayout.setHorizontalGroup(
            panelProgressLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelProgressLayout.setVerticalGroup(
            panelProgressLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 22, Short.MAX_VALUE)
        );

        org.openide.awt.Mnemonics.setLocalizedText(lblTagMessage, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.lblTagMessage.text")); // NOI18N

        txtTagMessage.setEditable(false);
        txtTagMessage.setBackground(txtTagName.getBackground());
        txtTagMessage.setColumns(1);
        txtTagMessage.setRows(1);
        jScrollPane2.setViewportView(txtTagMessage);

        txtTagger.setEditable(false);
        txtTagger.setText(org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.txtTagger.text")); // NOI18N

        lblTagger.setLabelFor(txtTagger);
        org.openide.awt.Mnemonics.setLocalizedText(lblTagger, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.lblTagger.text")); // NOI18N

        lblTagId.setLabelFor(txtTagId);
        org.openide.awt.Mnemonics.setLocalizedText(lblTagId, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.lblTagId.text")); // NOI18N

        txtTagId.setEditable(false);
        txtTagId.setText(org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.txtTagId.text")); // NOI18N

        tagsPanel.setLayout(new java.awt.BorderLayout());

        lstTags.setModel(new DefaultListModel());
        lstTags.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane1.setViewportView(lstTags);

        tagsPanel.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        org.openide.awt.Mnemonics.setLocalizedText(btnCreate, org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.btnCreate.text")); // NOI18N
        btnCreate.setToolTipText(org.openide.util.NbBundle.getMessage(ManageTagsPanel.class, "ManageTagsPanel.btnCreate.TTtext")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelProgress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)
                            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblTagId)
                                    .addComponent(lblTagger)
                                    .addComponent(lblTagMessage)
                                    .addComponent(jLabel1))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
                                    .addComponent(txtTagId, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
                                    .addComponent(txtTagger, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
                                    .addComponent(txtTagName))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tagsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel7)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(btnCreate)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnDelete)))
                                .addGap(0, 0, Short.MAX_VALUE)))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtTagName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTagId)
                            .addComponent(txtTagId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTagger)
                            .addComponent(txtTagger, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblTagMessage)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(tagsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(12, 12, 12)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnDelete)
                            .addComponent(btnCreate))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(panelProgress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    final javax.swing.JButton btnCreate = new javax.swing.JButton();
    final javax.swing.JButton btnDelete = new javax.swing.JButton();
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    final javax.swing.JScrollPane jScrollPane2 = new javax.swing.JScrollPane();
    final javax.swing.JLabel lblTagId = new javax.swing.JLabel();
    final javax.swing.JLabel lblTagMessage = new javax.swing.JLabel();
    final javax.swing.JLabel lblTaggedObject = new javax.swing.JLabel();
    final javax.swing.JLabel lblTagger = new javax.swing.JLabel();
    final javax.swing.JList lstTags = new javax.swing.JList();
    final javax.swing.JPanel panelProgress = new javax.swing.JPanel();
    final javax.swing.JPanel tagsPanel = new javax.swing.JPanel();
    final javax.swing.JTextField txtTagId = new javax.swing.JTextField();
    final javax.swing.JTextArea txtTagMessage = new javax.swing.JTextArea();
    final javax.swing.JTextField txtTagName = new javax.swing.JTextField();
    final javax.swing.JTextField txtTaggedObject = new javax.swing.JTextField();
    final javax.swing.JTextField txtTagger = new javax.swing.JTextField();
    // End of variables declaration//GEN-END:variables
}
